package com.lywz.biz.dao.test.impl;

import java.util.Collection;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.lywz.biz.common.dao.AbstractBaseDao;
import com.lywz.biz.common.entity.example.City2;
import com.lywz.biz.dao.test.City2Dao;
import com.lywz.core.util.CommonDefaultCheck;

@Repository("city2Dao")
public class City2DaoImpl extends AbstractBaseDao implements City2Dao {
	
    @Override
	@SuppressWarnings("unchecked")
    public Collection<City2> queryCity2List() throws Exception{
		Query query = session().getNamedQuery("city2.queryCity");
		
		Collection<City2> list = query.list();
		
		return (Collection<City2>) CommonDefaultCheck.checkDefault(list);
	}
}
